using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Medianamik.Core.Configuration;
using Medianamik.Core.Reports;

namespace Medianamik.Core.Urls
{
    public interface IUrlDictionary //: IEnumerable<IUrlDictionaryEntry>
    {
        void Reload();
        IUrlDictionaryEntry GetEntry(string path);
        IList<IUrlDictionaryEntry> GetEntries(Guid nodeId, CultureInfo culture);
        bool ContainsUrl(string path);
        void Remove(Guid nodeId);
        void Remove(Guid nodeId, CultureInfo culture);
        void UpdateUrlsFor(Guid nodeId);
        IList<IUrlDictionaryEntry> GetEntries(CultureInfo culture, string domain, string urlFilter);
        IList<string> GetDomains();
        int Count { get; }
        IList<IUrlDictionaryEntry> GetAllEntries();
        bool Contains(IUrlDictionaryEntry entry);
        string BuildUniqueRelativeUrlWithoutPrefixAndExtension(PathSegmentCollection segments, CultureInfo culture, WebSite website);
        bool UrlIsValid(string realPath);
        bool UrlIsUniqueForWebSite(IMedianamikUrl url);
        bool Initialized { get; }
        void Initialize(MedianamikConfigSection config, IPathSegmentFormater segmentFormater,
                        IReportManager<UrlDictionaryReport> reportManager);
        void Initialize(MedianamikConfigSection config);
        IList<IUrlDictionaryEntry> GetAllEntries(IndexationModes mode);
        bool UrlIsUniqueForNode(IMedianamikUrl url, Guid nodeId);
    }
}
